<template>
  <div id="app">
    <Header :key="updatekey" @updateKeyFn="updateKeyFn"></Header>
    <Nav />
    <router-view></router-view>
    <Footer />
    <Login />
    <Toast />
  </div>
</template>

<script>
import Header from "./components/Header.vue";
import Footer from "@/components/Footer.vue";
import Nav from "@/components/Nav.vue";
import Login from "@/components/Login.vue";
import Toast from "@/components/Toast.vue";
export default {
  data() {
    return {
      updatekey: 0,
    };
  },
  methods: {
    // 更新header
    updateKeyFn() {
      this.updatekey++;
    },
  },
  components: {
    Header,
    Footer,
    Nav,
    Login,
    Toast,
  },
};
</script>
 
<style lang = "less" scoped>
</style>